Skip to content

feat(wallet): add @metamask/assets-controllers to the default initialization configurations - #11315

Open
dawnseeker8 wants to merge 24 commits into
mainfrom
cursor/wallet-assets-controllers-draft-1943
Open

dawnseeker8 wants to merge 24 commits into
mainfrom
cursor/wallet-assets-controllers-draft-1943

Conversation

@dawnseeker8

@dawnseeker8 dawnseeker8 commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Explanation

@metamask/wallet does not yet construct any of the legacy @metamask/assets-controllers controllers. Hosts construct them, and several constructors call other controllers immediately (AccountsController:getSelectedAccount, KeyringController:getState, TokensController:getState, NetworkController:getNetworkClientById, and others) or start async work. So the host has to construct them in a specific order, after their dependencies.

This PR does two things, one commit each.

1. @metamask/assets-controllers: constructors no longer call other controllers.

The constructors of TokensController, TokenBalancesController, TokenDetectionController, TokenRatesController, AccountTrackerController, NftController, MultichainBalancesController, MultichainAssetsRatesController and MultichainAssetsController now only register handlers and subscribe to events.

  • The reads of other controllers, and the initial work (token-list enrichment, initial non-EVM balance fetch, Blockaid re-scan polling, seeding the selected chain in accountsByChainId), move to a new idempotent init() method.
  • init() returns early when the controller is deprecated.
  • TokenListController gains init(), which calls initialize() once.
  • TokenDetectionController.init() reports a missing PreferencesController through messenger.captureException instead of throwing. The next PreferencesController:stateChange fills in the value.
  • NftController exposes addNfts through its messenger.
  • TokensController's provider and chainId are now optional. Without a provider it uses the selected network client's provider (new allowed action NetworkController:getSelectedNetworkClient).

Every changed controller has a test that constructs it on a messenger with no handlers registered, plus an idempotency test. Existing tests that relied on constructor side effects now call init().

2. @metamask/wallet: the 16 messenger-based controllers become defaults.

The configurations live in src/initialization/instances/assets-controllers/, one file per controller in one folder, as permission-controller/ does. The codeowners script allows one initializationPath per package.

  • Each getMessenger delegates exactly the external actions and events the controller's messenger type declares. That includes controllers the client registers (PreferencesController, SnapController, PhishingController, AccountTreeController, AuthenticationController, AccountActivityService).
  • Callback options are built from messenger calls at call time, so construction order does not matter:
    • AccountTrackerController.getStakedBalanceForChain and TokenDetectionController.getBalancesInSingleCall call AssetsContractController.
    • NftDetectionController.addNfts, removeNft and getNftState call NftController.
    • Those three configurations use a messenger type that also includes those actions.
  • Service and option defaults, each overridable through instanceOptions:
    • CodefiTokenPricesServiceV2 for tokenPricesService.
    • TokenListService for tokenListService.
    • Ethereum mainnet for chainId.
    • A no-op trackMetaMetricsEvent.
    • NftDetectionController disabled: false and RatesController includeUsdRate: false.
  • Wallet.init() already calls init() on every instance that has one, so it now starts the assets controllers too. Polling is still started by the client.

DeFiPositionsControllerV2 is not included. It is newer, not in the ticket's scope, and can be added separately.

Notes for reviewers

  • The PreferencesController dependency appears at runtime, not at construction. AccountTrackerController.refresh (triggered by AccountsController:selectedEvmAccountChange and NetworkController:networkAdded) calls PreferencesController:getState without a guard. Hosts already register PreferencesController before unlocking, so Wallet.test.ts now registers a stub for it in the tests that unlock or import an SRP. The wallet changelog calls this out.
  • wallet.init() still has one rejected result, MultichainNetworkController:getState from NetworkEnablementController. It was already there before this PR and comes from another controller the wallet doesn't construct.
  • The wallet tests are table-driven in one assets-controllers.test.ts. It mocks @metamask/assets-controllers with subclasses that record their constructor options, so the forwarded options, default services and messenger-backed callbacks can be checked directly. The instances are still real controllers.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them
Open in Web Open in Cursor 

Note

High Risk
Breaking constructor/init contract across many asset controllers plus wallet default registration that can collide with existing host setup and relies on runtime preferences and phishing services.

Reviewed by Cursor Bugbot for commit f47b033. Bugbot is set up for automated code reviews on this repo. Configure here.

cursoragent and others added 6 commits November 5, 2026 10:01
… into init

Constructors of TokensController, TokenBalancesController,
TokenDetectionController, TokenRatesController, AccountTrackerController,
NftController, MultichainBalancesController,
MultichainAssetsRatesController and MultichainAssetsController no longer
call other controllers or start background work. The work moves to a new
idempotent init method. TokenListController gains init, which calls
initialize once. NftController exposes addNfts through its messenger, and
TokensController falls back to the selected network client's provider.

Co-authored-by: Xiaoming Wang <dawnseeker8@users.noreply.github.com>
Co-authored-by: Xiaoming Wang <dawnseeker8@users.noreply.github.com>
…gurations

Adds the 16 messenger-based @metamask/assets-controllers controllers to
the wallet's default initialization configurations. Each configuration
delegates the actions and events its controller's messenger declares,
builds callback options from messenger calls so construction order does
not matter, and defaults the token prices and token list services.
Wallet.init() runs the controllers' init methods.

Co-authored-by: Xiaoming Wang <dawnseeker8@users.noreply.github.com>
Co-authored-by: Xiaoming Wang <dawnseeker8@users.noreply.github.com>
The Check Changelog workflow requires Unreleased entries to reference this pull request.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep the assets-controllers entries for this pull request in Unreleased. The merge had placed them under the released 113.2.0 section.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@dawnseeker8
dawnseeker8 marked this pull request as ready for review November 9, 2026 09:59
@dawnseeker8
dawnseeker8 requested review from a team as code owners November 9, 2026 09:59
Co-authored-by: Cursor <cursoragent@cursor.com>
@dawnseeker8

Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/account-tree-controller@11.2.0-preview-06c1d7a06
@metamask-previews/accounts-controller@40.1.0-preview-06c1d7a06
@metamask-previews/address-book-controller@8.0.0-preview-06c1d7a06
@metamask-previews/advanced-chart-core@1.1.0-preview-06c1d7a06
@metamask-previews/ai-controllers@2.0.0-preview-06c1d7a06
@metamask-previews/analytics-controller@4.2.0-preview-06c1d7a06
@metamask-previews/analytics-data-regulation-controller@0.0.0-preview-06c1d7a06
@metamask-previews/announcement-controller@9.0.0-preview-06c1d7a06
@metamask-previews/app-metadata-controller@3.0.0-preview-06c1d7a06
@metamask-previews/approval-controller@10.0.0-preview-06c1d7a06
@metamask-previews/assets-controller@20.2.3-preview-06c1d7a06
@metamask-previews/assets-controllers@113.2.0-preview-06c1d7a06
@metamask-previews/authenticated-user-storage@4.1.0-preview-06c1d7a06
@metamask-previews/base-controller@10.1.0-preview-06c1d7a06
@metamask-previews/base-data-service@2.1.0-preview-06c1d7a06
@metamask-previews/bitcoin-regtest-up@2.0.0-preview-06c1d7a06
@metamask-previews/bridge-controller@83.1.3-preview-06c1d7a06
@metamask-previews/bridge-status-controller@78.0.1-preview-06c1d7a06
@metamask-previews/build-utils@4.0.0-preview-06c1d7a06
@metamask-previews/byte-utils@0.1.0-preview-06c1d7a06
@metamask-previews/chain-agnostic-permission@2.1.0-preview-06c1d7a06
@metamask-previews/chomp-api-service@7.0.0-preview-06c1d7a06
@metamask-previews/claims-controller@1.1.0-preview-06c1d7a06
@metamask-previews/client-controller@2.0.0-preview-06c1d7a06
@metamask-previews/client-utils@3.1.1-preview-06c1d7a06
@metamask-previews/compliance-controller@3.0.0-preview-06c1d7a06
@metamask-previews/composable-controller@13.0.0-preview-06c1d7a06
@metamask-previews/config-registry-controller@5.0.0-preview-06c1d7a06
@metamask-previews/connectivity-controller@1.0.0-preview-06c1d7a06
@metamask-previews/controller-utils@13.0.0-preview-06c1d7a06
@metamask-previews/core-backend@14.0.0-preview-06c1d7a06
@metamask-previews/cryptography@1.1.2-preview-06c1d7a06
@metamask-previews/delegation-controller@4.0.0-preview-06c1d7a06
@metamask-previews/earn-controller@13.0.2-preview-06c1d7a06
@metamask-previews/eip-5792-middleware@4.1.0-preview-06c1d7a06
@metamask-previews/eip-7702-internal-rpc-middleware@1.0.0-preview-06c1d7a06
@metamask-previews/eip1193-permission-middleware@3.0.0-preview-06c1d7a06
@metamask-previews/error-utils@0.1.0-preview-06c1d7a06
@metamask-previews/eth-block-tracker@16.0.0-preview-06c1d7a06
@metamask-previews/eth-json-rpc-middleware@26.0.0-preview-06c1d7a06
@metamask-previews/eth-json-rpc-provider@7.0.0-preview-06c1d7a06
@metamask-previews/eth-sig-util@9.0.0-preview-06c1d7a06
@metamask-previews/foundryup@2.0.0-preview-06c1d7a06
@metamask-previews/gas-fee-controller@27.1.0-preview-06c1d7a06
@metamask-previews/gator-permissions-controller@6.1.0-preview-06c1d7a06
@metamask-previews/geolocation-controller@2.0.0-preview-06c1d7a06
@metamask-previews/java-tron-up@2.0.0-preview-06c1d7a06
@metamask-previews/json-rpc-engine@11.0.0-preview-06c1d7a06
@metamask-previews/json-rpc-middleware-stream@9.0.0-preview-06c1d7a06
@metamask-previews/key-tree@10.1.1-preview-06c1d7a06
@metamask-previews/keyring-controller@28.2.0-preview-06c1d7a06
@metamask-previews/kyc-controller@0.16.0-preview-06c1d7a06
@metamask-previews/local-node-utils@2.0.0-preview-06c1d7a06
@metamask-previews/logging-controller@10.0.0-preview-06c1d7a06
@metamask-previews/marketing-consent-controller@1.1.0-preview-06c1d7a06
@metamask-previews/message-manager@15.0.0-preview-06c1d7a06
@metamask-previews/messenger@3.0.0-preview-06c1d7a06
@metamask-previews/messenger-cli@1.0.0-preview-06c1d7a06
@metamask-previews/mfa-recovery-controller@0.0.0-preview-06c1d7a06
@metamask-previews/money-account-api-data-service@2.3.1-preview-06c1d7a06
@metamask-previews/money-account-balance-service@3.1.2-preview-06c1d7a06
@metamask-previews/money-account-controller@3.0.0-preview-06c1d7a06
@metamask-previews/money-account-lifecycle-controller@0.0.0-preview-06c1d7a06
@metamask-previews/money-account-mfa-whitelist@0.2.0-preview-06c1d7a06
@metamask-previews/money-account-upgrade-controller@6.0.0-preview-06c1d7a06
@metamask-previews/money-account-utils@2.2.0-preview-06c1d7a06
@metamask-previews/multichain-account-service@14.1.0-preview-06c1d7a06
@metamask-previews/multichain-api-middleware@5.0.0-preview-06c1d7a06
@metamask-previews/multichain-network-controller@4.1.0-preview-06c1d7a06
@metamask-previews/multichain-transactions-controller@8.0.0-preview-06c1d7a06
@metamask-previews/name-controller@10.0.0-preview-06c1d7a06
@metamask-previews/network-connection-banner-controller@1.0.0-preview-06c1d7a06
@metamask-previews/network-controller@37.1.1-preview-06c1d7a06
@metamask-previews/network-enablement-controller@7.1.0-preview-06c1d7a06
@metamask-previews/node-utils@0.1.0-preview-06c1d7a06
@metamask-previews/notification-services-controller@30.1.0-preview-06c1d7a06
@metamask-previews/passkey-controller@4.1.0-preview-06c1d7a06
@metamask-previews/permission-controller@14.1.0-preview-06c1d7a06
@metamask-previews/permission-log-controller@6.0.0-preview-06c1d7a06
@metamask-previews/perps-controller@22.3.0-preview-06c1d7a06
@metamask-previews/phishing-controller@18.3.0-preview-06c1d7a06
@metamask-previews/platform-api-docs@0.2.1-preview-06c1d7a06
@metamask-previews/polling-controller@17.0.0-preview-06c1d7a06
@metamask-previews/preferences-controller@24.0.0-preview-06c1d7a06
@metamask-previews/profile-controller@2.0.0-preview-06c1d7a06
@metamask-previews/profile-metrics-controller@5.2.1-preview-06c1d7a06
@metamask-previews/profile-sync-controller@36.0.0-preview-06c1d7a06
@metamask-previews/ramps-controller@29.0.0-preview-06c1d7a06
@metamask-previews/rate-limit-controller@8.0.0-preview-06c1d7a06
@metamask-previews/react-data-query@2.0.0-preview-06c1d7a06
@metamask-previews/remote-feature-flag-controller@7.0.0-preview-06c1d7a06
@metamask-previews/sample-controllers@6.0.0-preview-06c1d7a06
@metamask-previews/seedless-onboarding-controller@12.0.0-preview-06c1d7a06
@metamask-previews/selected-network-controller@27.0.0-preview-06c1d7a06
@metamask-previews/sentinel-api-service@2.1.0-preview-06c1d7a06
@metamask-previews/shield-controller@7.1.1-preview-06c1d7a06
@metamask-previews/signature-controller@40.0.0-preview-06c1d7a06
@metamask-previews/smart-transactions-controller@27.2.1-preview-06c1d7a06
@metamask-previews/snap-account-service@4.0.0-preview-06c1d7a06
@metamask-previews/social-controllers@3.18.0-preview-06c1d7a06
@metamask-previews/solana-test-validator-up@2.0.0-preview-06c1d7a06
@metamask-previews/stellar-quickstart-up@0.0.0-preview-06c1d7a06
@metamask-previews/storage-service@2.0.0-preview-06c1d7a06
@metamask-previews/subscription-controller@15.2.0-preview-06c1d7a06
@metamask-previews/transaction-controller@73.1.1-preview-06c1d7a06
@metamask-previews/transaction-pay-controller@31.0.0-preview-06c1d7a06
@metamask-previews/transaction-pay-middleware@2.0.1-preview-06c1d7a06
@metamask-previews/type-utils@0.1.0-preview-06c1d7a06
@metamask-previews/user-operation-controller@42.1.0-preview-06c1d7a06
@metamask-previews/utils@12.0.1-preview-06c1d7a06
@metamask-previews/wallet@21.0.0-preview-06c1d7a06
@metamask-previews/watch-only-account-service@0.1.0-preview-06c1d7a06

…controllers-draft-1943

Co-authored-by: Xiaoming Wang <dawnseeker8@users.noreply.github.com>

# Conflicts:
#	packages/assets-controllers/CHANGELOG.md

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

cursoragent and others added 3 commits November 9, 2026 11:51
TokenRatesController applies native asset identifiers from later
NetworkEnablementController updates, and TokenDetectionController reads
useTokenDetection again when it is still unset at detection time.

Co-authored-by: Xiaoming Wang <dawnseeker8@users.noreply.github.com>
Bump the wallet's @metamask/assets-controllers range to ^113.3.0 so
yarn install --immutable passes, and move this PR's changelog entries
out of the released 113.3.0 section back to Unreleased.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dawnseeker8

Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/account-tree-controller@11.2.0-preview-a553ac65f
@metamask-previews/accounts-controller@40.1.0-preview-a553ac65f
@metamask-previews/address-book-controller@8.0.0-preview-a553ac65f
@metamask-previews/advanced-chart-core@1.1.0-preview-a553ac65f
@metamask-previews/ai-controllers@2.0.0-preview-a553ac65f
@metamask-previews/analytics-controller@4.2.0-preview-a553ac65f
@metamask-previews/analytics-data-regulation-controller@0.0.0-preview-a553ac65f
@metamask-previews/announcement-controller@9.0.0-preview-a553ac65f
@metamask-previews/app-metadata-controller@3.0.0-preview-a553ac65f
@metamask-previews/approval-controller@10.0.0-preview-a553ac65f
@metamask-previews/assets-controller@20.3.0-preview-a553ac65f
@metamask-previews/assets-controllers@113.3.0-preview-a553ac65f
@metamask-previews/authenticated-user-storage@4.1.0-preview-a553ac65f
@metamask-previews/base-controller@10.1.0-preview-a553ac65f
@metamask-previews/base-data-service@2.1.0-preview-a553ac65f
@metamask-previews/bitcoin-regtest-up@2.0.0-preview-a553ac65f
@metamask-previews/bridge-controller@83.1.3-preview-a553ac65f
@metamask-previews/bridge-status-controller@78.0.1-preview-a553ac65f
@metamask-previews/build-utils@4.0.0-preview-a553ac65f
@metamask-previews/byte-utils@0.1.0-preview-a553ac65f
@metamask-previews/chain-agnostic-permission@2.1.0-preview-a553ac65f
@metamask-previews/chomp-api-service@7.0.0-preview-a553ac65f
@metamask-previews/claims-controller@1.1.0-preview-a553ac65f
@metamask-previews/client-controller@2.0.0-preview-a553ac65f
@metamask-previews/client-utils@3.1.1-preview-a553ac65f
@metamask-previews/compliance-controller@3.0.0-preview-a553ac65f
@metamask-previews/composable-controller@13.0.0-preview-a553ac65f
@metamask-previews/config-registry-controller@5.0.0-preview-a553ac65f
@metamask-previews/connectivity-controller@1.0.0-preview-a553ac65f
@metamask-previews/controller-utils@13.0.0-preview-a553ac65f
@metamask-previews/core-backend@14.0.0-preview-a553ac65f
@metamask-previews/cryptography@1.1.2-preview-a553ac65f
@metamask-previews/delegation-controller@4.0.0-preview-a553ac65f
@metamask-previews/earn-controller@13.0.2-preview-a553ac65f
@metamask-previews/eip-5792-middleware@4.1.0-preview-a553ac65f
@metamask-previews/eip-7702-internal-rpc-middleware@1.0.0-preview-a553ac65f
@metamask-previews/eip1193-permission-middleware@3.0.0-preview-a553ac65f
@metamask-previews/error-utils@0.1.0-preview-a553ac65f
@metamask-previews/eth-block-tracker@16.0.0-preview-a553ac65f
@metamask-previews/eth-json-rpc-middleware@26.0.0-preview-a553ac65f
@metamask-previews/eth-json-rpc-provider@7.0.0-preview-a553ac65f
@metamask-previews/eth-sig-util@9.0.0-preview-a553ac65f
@metamask-previews/foundryup@2.0.0-preview-a553ac65f
@metamask-previews/gas-fee-controller@27.1.0-preview-a553ac65f
@metamask-previews/gator-permissions-controller@6.1.0-preview-a553ac65f
@metamask-previews/geolocation-controller@2.0.0-preview-a553ac65f
@metamask-previews/java-tron-up@2.0.0-preview-a553ac65f
@metamask-previews/json-rpc-engine@11.0.0-preview-a553ac65f
@metamask-previews/json-rpc-middleware-stream@9.0.0-preview-a553ac65f
@metamask-previews/key-tree@10.1.1-preview-a553ac65f
@metamask-previews/keyring-controller@28.2.0-preview-a553ac65f
@metamask-previews/kyc-controller@0.16.0-preview-a553ac65f
@metamask-previews/local-node-utils@2.0.0-preview-a553ac65f
@metamask-previews/logging-controller@10.0.0-preview-a553ac65f
@metamask-previews/marketing-consent-controller@1.1.0-preview-a553ac65f
@metamask-previews/message-manager@15.0.0-preview-a553ac65f
@metamask-previews/messenger@3.0.0-preview-a553ac65f
@metamask-previews/messenger-cli@1.0.0-preview-a553ac65f
@metamask-previews/mfa-recovery-controller@0.0.0-preview-a553ac65f
@metamask-previews/money-account-api-data-service@2.3.1-preview-a553ac65f
@metamask-previews/money-account-balance-service@3.1.2-preview-a553ac65f
@metamask-previews/money-account-controller@3.0.0-preview-a553ac65f
@metamask-previews/money-account-lifecycle-controller@0.0.0-preview-a553ac65f
@metamask-previews/money-account-mfa-whitelist@0.2.0-preview-a553ac65f
@metamask-previews/money-account-upgrade-controller@6.0.0-preview-a553ac65f
@metamask-previews/money-account-utils@2.2.0-preview-a553ac65f
@metamask-previews/multichain-account-service@14.1.0-preview-a553ac65f
@metamask-previews/multichain-api-middleware@5.0.0-preview-a553ac65f
@metamask-previews/multichain-network-controller@4.1.0-preview-a553ac65f
@metamask-previews/multichain-transactions-controller@8.0.0-preview-a553ac65f
@metamask-previews/name-controller@10.0.0-preview-a553ac65f
@metamask-previews/network-connection-banner-controller@1.0.0-preview-a553ac65f
@metamask-previews/network-controller@37.1.1-preview-a553ac65f
@metamask-previews/network-enablement-controller@7.1.0-preview-a553ac65f
@metamask-previews/node-utils@0.1.0-preview-a553ac65f
@metamask-previews/notification-services-controller@30.1.0-preview-a553ac65f
@metamask-previews/passkey-controller@4.1.0-preview-a553ac65f
@metamask-previews/permission-controller@14.1.0-preview-a553ac65f
@metamask-previews/permission-log-controller@6.0.0-preview-a553ac65f
@metamask-previews/perps-controller@22.3.0-preview-a553ac65f
@metamask-previews/phishing-controller@18.3.0-preview-a553ac65f
@metamask-previews/platform-api-docs@0.2.1-preview-a553ac65f
@metamask-previews/polling-controller@17.0.0-preview-a553ac65f
@metamask-previews/preferences-controller@24.0.0-preview-a553ac65f
@metamask-previews/profile-controller@2.0.0-preview-a553ac65f
@metamask-previews/profile-metrics-controller@5.2.1-preview-a553ac65f
@metamask-previews/profile-sync-controller@36.0.0-preview-a553ac65f
@metamask-previews/ramps-controller@29.0.0-preview-a553ac65f
@metamask-previews/rate-limit-controller@8.0.0-preview-a553ac65f
@metamask-previews/react-data-query@2.0.0-preview-a553ac65f
@metamask-previews/remote-feature-flag-controller@7.0.0-preview-a553ac65f
@metamask-previews/sample-controllers@6.0.0-preview-a553ac65f
@metamask-previews/seedless-onboarding-controller@12.0.0-preview-a553ac65f
@metamask-previews/selected-network-controller@27.0.0-preview-a553ac65f
@metamask-previews/sentinel-api-service@2.1.0-preview-a553ac65f
@metamask-previews/shield-controller@7.1.1-preview-a553ac65f
@metamask-previews/signature-controller@40.0.0-preview-a553ac65f
@metamask-previews/smart-transactions-controller@27.2.1-preview-a553ac65f
@metamask-previews/snap-account-service@4.0.0-preview-a553ac65f
@metamask-previews/social-controllers@3.19.0-preview-a553ac65f
@metamask-previews/solana-test-validator-up@2.0.0-preview-a553ac65f
@metamask-previews/stellar-quickstart-up@0.0.0-preview-a553ac65f
@metamask-previews/storage-service@2.0.0-preview-a553ac65f
@metamask-previews/subscription-controller@15.2.0-preview-a553ac65f
@metamask-previews/transaction-controller@73.1.1-preview-a553ac65f
@metamask-previews/transaction-pay-controller@31.0.0-preview-a553ac65f
@metamask-previews/transaction-pay-middleware@2.0.1-preview-a553ac65f
@metamask-previews/type-utils@0.1.0-preview-a553ac65f
@metamask-previews/user-operation-controller@42.1.0-preview-a553ac65f
@metamask-previews/utils@12.0.1-preview-a553ac65f
@metamask-previews/wallet@21.0.0-preview-a553ac65f
@metamask-previews/watch-only-account-service@0.1.0-preview-a553ac65f

cursoragent and others added 2 commits November 9, 2026 14:12
Keep this branch's unreleased changelog entries and main's released 113.3.1 and 21.0.1 sections. Point @metamask/wallet at @metamask/assets-controllers ^113.3.1 so the workspace range matches the released package.

Co-authored-by: Xiaoming Wang <dawnseeker8@users.noreply.github.com>
…controllers-draft-1943

Co-authored-by: Xiaoming Wang <dawnseeker8@users.noreply.github.com>

# Conflicts:
#	packages/assets-controllers/CHANGELOG.md
#	packages/wallet/CHANGELOG.md

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

cursoragent and others added 3 commits November 10, 2026 08:34
…controllers-draft-1943

Co-authored-by: Xiaoming Wang <dawnseeker8@users.noreply.github.com>
…er is registered

The first re-scan runs during init, before a client may have registered
PhishingController. Retry that miss every minute, then return to the
configured interval once bulkScanTokens can be called.

Co-authored-by: Xiaoming Wang <dawnseeker8@users.noreply.github.com>
…controllers-draft-1943

Keep this branch's unreleased assets-controllers entries and main's
profile-sync-controller bump to ^36.1.1.

Co-authored-by: Xiaoming Wang <dawnseeker8@users.noreply.github.com>

# Conflicts:
#	packages/assets-controllers/CHANGELOG.md

@Prithpal-Sooriya Prithpal-Sooriya left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Most of the legacy AssetControllers will be removed, but we can do this as a separate task - nice work!

@FrederikBolding

Copy link
Copy Markdown
Member

LGTM! Most of the legacy AssetControllers will be removed, but we can do this as a separate task - nice work!

Do we want to refrain from adding them to wallet then? If we are going to remove them again soon?

…controllers-draft-1943

Co-authored-by: Xiaoming Wang <dawnseeker8@users.noreply.github.com>

# Conflicts:
#	packages/assets-controllers/CHANGELOG.md
@dawnseeker8

Copy link
Copy Markdown
Contributor Author

LGTM! Most of the legacy AssetControllers will be removed, but we can do this as a separate task - nice work!

Do we want to refrain from adding them to wallet then? If we are going to remove them again soon?

hi, @FrederikBolding , @Prithpal-Sooriya mentioned that since we are still in the middle of moving AssetsControllers, he ask me to merge to wallet library. i will ask him to comment on this.

@Prithpal-Sooriya

Copy link
Copy Markdown
Contributor

Hey @FrederikBolding @dawnseeker8 I'd say most of these controllers have been deprecated, but there are some that we will keep and not remove anytime soon - NFTController and Deficontroller.

I think I agree, if we want, we can fully remove all these other controllers that aren't being used (e.g. CurrencyRateController, TokensController, etc), but we're also making sure that both mobile and extension clients have fully stopped using them (https://consensyssoftware.atlassian.net/browse/ASSETS-4135 // https://consensyssoftware.atlassian.net/browse/ASSETS-4141)

@dawnseeker8
dawnseeker8 disabled auto-merge November 12, 2026 09:56
…controllers-draft-1943

Co-authored-by: Xiaoming Wang <dawnseeker8@users.noreply.github.com>

# Conflicts:
#	packages/assets-controllers/CHANGELOG.md
#	packages/wallet/CHANGELOG.md
@github-actions

Copy link
Copy Markdown
Contributor

🛑 Files requiring codeowner review

To merge this PR, you'll need to get approvals from the following owners.

@MetaMask/core-platform (27 files)
  • .github/CODEOWNERS
  • packages/wallet/CHANGELOG.md
  • packages/wallet/package.json
  • packages/wallet/src/initialization/instances/assets-controllers/account-tracker-controller.ts
  • packages/wallet/src/initialization/instances/assets-controllers/assets-contract-controller.ts
  • packages/wallet/src/initialization/instances/assets-controllers/assets-controllers.test.ts
  • packages/wallet/src/initialization/instances/assets-controllers/currency-rate-controller.ts
  • packages/wallet/src/initialization/instances/assets-controllers/defi-positions-controller.ts
  • packages/wallet/src/initialization/instances/assets-controllers/multichain-assets-controller.ts
  • packages/wallet/src/initialization/instances/assets-controllers/multichain-assets-rates-controller.ts
  • packages/wallet/src/initialization/instances/assets-controllers/multichain-balances-controller.ts
  • packages/wallet/src/initialization/instances/assets-controllers/nft-controller.ts
  • packages/wallet/src/initialization/instances/assets-controllers/nft-detection-controller.ts
  • packages/wallet/src/initialization/instances/assets-controllers/rates-controller.ts
  • packages/wallet/src/initialization/instances/assets-controllers/token-balances-controller.ts
  • packages/wallet/src/initialization/instances/assets-controllers/token-detection-controller.ts
  • packages/wallet/src/initialization/instances/assets-controllers/token-list-controller.ts
  • packages/wallet/src/initialization/instances/assets-controllers/token-rates-controller.ts
  • packages/wallet/src/initialization/instances/assets-controllers/token-search-discovery-data-controller.ts
  • packages/wallet/src/initialization/instances/assets-controllers/tokens-controller.ts
  • packages/wallet/src/initialization/instances/assets-controllers/types.ts
  • packages/wallet/src/initialization/instances/index.ts
  • packages/wallet/src/types.ts
  • packages/wallet/src/Wallet.test.ts
  • packages/wallet/tsconfig.build.json
  • packages/wallet/tsconfig.json
  • packages/wallet/tsconfig.lint.json
@MetaMask/metamask-assets (23 files)
  • packages/assets-controllers/CHANGELOG.md
  • packages/assets-controllers/src/AccountTrackerController.test.ts
  • packages/assets-controllers/src/AccountTrackerController.ts
  • packages/assets-controllers/src/index.ts
  • packages/assets-controllers/src/MultichainAssetsController/MultichainAssetsController.test.ts
  • packages/assets-controllers/src/MultichainAssetsController/MultichainAssetsController.ts
  • packages/assets-controllers/src/MultichainAssetsRatesController/MultichainAssetsRatesController.test.ts
  • packages/assets-controllers/src/MultichainAssetsRatesController/MultichainAssetsRatesController.ts
  • packages/assets-controllers/src/MultichainBalancesController/MultichainBalancesController.test.ts
  • packages/assets-controllers/src/MultichainBalancesController/MultichainBalancesController.ts
  • packages/assets-controllers/src/NftController-method-action-types.ts
  • packages/assets-controllers/src/NftController.test.ts
  • packages/assets-controllers/src/NftController.ts
  • packages/assets-controllers/src/TokenBalancesController.test.ts
  • packages/assets-controllers/src/TokenBalancesController.ts
  • packages/assets-controllers/src/TokenDetectionController.test.ts
  • packages/assets-controllers/src/TokenDetectionController.ts
  • packages/assets-controllers/src/TokenListController.test.ts
  • packages/assets-controllers/src/TokenListController.ts
  • packages/assets-controllers/src/TokenRatesController.test.ts
  • packages/assets-controllers/src/TokenRatesController.ts
  • packages/assets-controllers/src/TokensController.test.ts
  • packages/assets-controllers/src/TokensController.ts

ℹ️ Files co-owned by @MetaMask/core-platform (expand for more)

[!NOTE]
For convenience in maintaining this repo, @MetaMask/core-platform co-owns
the following files. It is not required to seek approval from
@MetaMask/core-platform to change these files. This section is purely
informational.

  • packages/assets-controllers/CHANGELOG.md

cursoragent and others added 2 commits November 17, 2026 01:57
…controllers-draft-1943

Co-authored-by: Xiaoming Wang <dawnseeker8@users.noreply.github.com>

# Conflicts:
#	packages/assets-controllers/CHANGELOG.md
#	packages/wallet/CHANGELOG.md
…controllers-draft-1943

Co-authored-by: Xiaoming Wang <dawnseeker8@users.noreply.github.com>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

cursoragent and others added 3 commits November 18, 2026 08:21
MultichainBalancesController.init and TokensController.init awaited the
initial non-EVM balance fetch and token-list enrichment. Those used to
run fire-and-forget from the constructor, so a hung snap or token-list
request kept Wallet.init() from settling. Start both in the background
again, and keep logging or swallowing their failures.

Co-authored-by: Xiaoming Wang <dawnseeker8@users.noreply.github.com>
…controllers-draft-1943

Co-authored-by: Xiaoming Wang <dawnseeker8@users.noreply.github.com>
…troller init test

The init-pending test returned partial MultichainAssetsController and KeyringController states, which lint:tsc:check rejected.

Co-authored-by: Xiaoming Wang <dawnseeker8@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f47b033. Configure here.

removeNft: (...args) =>
messenger.call('NftController:removeNft', ...args),
getNftState: () => messenger.call('NftController:getState'),
}),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NFT detection ignores persisted preference

Medium Severity

NftDetectionController is constructed with disabled: false and never reads PreferencesController:getState. #disabled is only updated from PreferencesController:stateChange, which is not replayed to existing subscribers. A persisted useNftDetection: false therefore never applies, so detectNfts keeps running until that preference changes.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f47b033. Configure here.

This branch was previously deployed

1 inactive (outdated) deployment
default-branch — 1f8da612 Deployed Nov 9, 2026 by dawnseeker8 via Determine whether this PR is a release PR #6718
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants